home *** CD-ROM | disk | FTP | other *** search
- /*
- (C) 1995 AROS - The Amiga Replacement OS
- $Id: freevec.c 1.1 1995/11/14 22:31:07 digulla Exp digulla $
- $Log: freevec.c $
- * Revision 1.1 1995/11/14 22:31:07 digulla
- * Initial revision
- *
- Desc:
- Lang: english
- */
- #include "exec_intern.h"
- #include "memory.h"
-
- /*****************************************************************************
-
- NAME */
- #include <clib/exec_protos.h>
-
- __AROS_LH1(void, FreeVec,
-
- /* SYNOPSIS */
- __AROS_LA(APTR, memoryBlock, A1),
-
- /* LOCATION */
- struct ExecBase *, SysBase, 115, Exec)
-
- /* FUNCTION
- Free some memory allocated with allocvec.
-
- INPUTS
- memoryBlock - The memory to be freed. It is safe to free a NULL pointer.
-
- RESULT
-
- NOTES
-
- EXAMPLE
-
- BUGS
-
- SEE ALSO
- AllocVec()
-
- INTERNALS
-
- HISTORY
- 15-10-95 created by m. fleischer
- 26-10-95 digulla adjusted to new calling scheme
-
- ******************************************************************************/
- {
- __AROS_FUNC_INIT
- /* If there's nothing to free do nothing. */
- if (memoryBlock != NULL)
- {
- UBYTE * ptr = (UBYTE *) memoryBlock;
-
- ptr -= ALLOCVEC_TOTAL;
- FreeMem (ptr, *(ULONG *)ptr);
- }
- __AROS_FUNC_EXIT
- } /* FreeVec */
-